using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.Approval
{
    /// <summary>
    /// 审批流程实体
    /// </summary>
    [Table("ApprovalProcess")]
    public class ApprovalProcess : BaseEntity
    {
        /// <summary>
        /// 流程名称
        /// </summary>
        [Required]
        [StringLength(100)]
        public string ProcessName { get; set; } = string.Empty;

        /// <summary>
        /// 流程描述
        /// </summary>
        [StringLength(500)]
        public string Description { get; set; } = string.Empty;

        /// <summary>
        /// 流程状态 (0:禁用 1:启用)
        /// </summary>
        public int Status { get; set; } = 1;

        /// <summary>
        /// 流程类型 (采购订单/销售订单/入库单/出库单等)
        /// </summary>
        [Required]
        [StringLength(50)]
        public string ProcessType { get; set; } = string.Empty;

        /// <summary>
        /// 审批节点集合
        /// </summary>
        public virtual ICollection<ApprovalNode> ApprovalNodes { get; set; } = new List<ApprovalNode>();
    }
}
